'''
Created on Aug 13, 2010

@author: riche
'''

from ft.directory import cameras
from ft.framework import system

def run_as_sys():
    sys = system.System()
    
    client_int = system.AppInterface('ft.client.as_client', 'client', True, 
                                     '-i {}ft/tests/TEST_INPUT.txt -o {}ft/tests/TEST_OUTPUT.txt'.format(cameras.local_directory.package_root, 
                                                                                                       cameras.local_directory.package_root))
    server0_int = system.AppInterface('ft.server.as_server', 'server0')
    server1_int = system.AppInterface('ft.server.as_server', 'server1')
    agree0_int = system.AppInterface('ft.agreement.as_agreement', 'agree0')
    agree1_int = system.AppInterface('ft.agreement.as_agreement', 'agree1')
    agree2_int = system.AppInterface('ft.agreement.as_agreement', 'agree2')
    
    sys.add_apps([client_int, server0_int, server1_int, agree0_int, agree1_int, agree2_int])
    
    sys.run(cameras.local_directory)
    
    sys.wait_and_end()
    
if __name__ == '__main__':
    run_as_sys()
    
    